

#ifndef _PAGE_MANAGER_H
#define _PAGE_MANAGER_H

#include <input_manager.h>
#include <disp_manager.h>
#include <fonts_manager.h>
/*页面参数*/
typedef struct PageParams {
    int iPageID;                    /*页面ID值，由PageAction.name计算得到*/              
    char strCurPictureFile[256];    /* 要处理的第1个图片文件 */
}T_PageParams, *PT_PageParams;

/*页面操作*/
typedef struct PageAction {
	char *name;                       /* 页面名字 */    
	void (*Run)(PT_PageParams ptParentPageParams);  
	int (*GetInputEvent)(PT_PageLayout ptPageLayout, PT_InputEvent ptInputEvent);  
	int (*Prepare)(void);         
	struct PageAction *ptNext;    
}T_PageAction, *PT_PageAction;

int ID(char *strName);



int MainPageInit(void);

int ReaderPageInit(void);

int BrowsePageInit(void);

int CameraPageInit(void);
int ImagePageInit(void);
int SmartHomePageInit(void);
int MnistPageInit(void);
int RegisterPageAction(PT_PageAction ptPageAction);
void ShowPages(void);
int PagesInit(void);

int GeneratePage(PT_PageLayout ptPageLayout, PT_VideoMem ptVideoMem);

int GenericGetInputEvent(PT_PageLayout ptPageLayout, PT_InputEvent ptInputEvent);

PT_PageAction Page(char *pcName);
void CalculatePageMenusLayout(PT_PageLayout ptPageLayout,int iNumMenu);
/*两个时间点间的间隔*/
int TimeMSBetween(struct timeval tTimeStart, struct timeval tTimeEnd);

void PagesExit(void);
int MergeMouseToDisp(PT_InputEvent ptInputEvent,PT_VideoMem ptVideoMem);


#endif 

